<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
	<class name="cn.firstsoft.modules.emp.domain.Employee" table="employee">
		    <id name="id" type="integer">
            <column name="id" />
            <generator class="native" >
				         <param name="sequence">EMPLOYEE_ID_SEQ</param>
            </generator>
        </id>
		<property name="empNo" type="string">
			<column name="emp_no" length="50" />
		</property>
		<property name="easPersonId" type="string">
			<column name="eas_person_id" length="50" />
		</property>
		<property name="cardNo" type="string">
			<column name="card_no" length="50" />
		</property>

		<property name="sex" type="integer">
			<column name="sex"/>
		</property>
        <many-to-one name="dept" class="org.springside.modules.security.domain.Dept" fetch="select">
            <column name="dept_id"/>
        </many-to-one>
		<property name="marriaged" type="string">
			<column name="marriaged" length="50" />
		</property>
		<property name="birthday" type="timestamp">
			<column name="birthday" length="23" />
		</property>
		<property name="empAge" type="integer">
			<column name="emp_age" />
		</property>
		<property name="nation" type="string">
			<column name="nation" length="50" />
		</property>

		<property name="place" type="string">
			<column name="place" length="250" />
		</property>

		<property name="height" type="string">
			<column name="height" length="50" />
		</property>

		<property name="bloodType" type="string">
			<column name="blood_type" length="50" />
		</property>


		<property name="tel" type="string">
			<column name="tel" length="50" />
		</property>

		<property name="degree" type="string">
			<column name="degree" length="50" />
		</property>

		<property name="foreignLang" type="string">
			<column name="foreign_lang" length="50" />
		</property>

		<property name="foreignLangLevel" type="string">
			<column name="foreign_lang_level" length="50" />
		</property>

		<property name="specialty" type="string">
			<column name="specialty" length="50" />
		</property>

		<property name="pcAblility" type="string">
			<column name="pc_ablility" length="50" />
		</property>

		<property name="manclarinLevel" type="string">
			<column name="manclarin_level" length="50" />
		</property>

		<property name="vernacularLevel" type="string">
			<column name="vernacular_level" length="50" />
		</property>

		<property name="workAblility" type="string">
			<column name="work_ablility" length="50" />
		</property>

		<property name="probationStartdate" type="timestamp">
			<column name="probation_startdate" length="23" />
		</property>

		<property name="probationMonth" type="integer">
			<column name="probation_month" />
		</property>

		<property name="probationEnddate" type="timestamp">
			<column name="probation_enddate" length="23" />
		</property>

		<property name="officialDate" type="timestamp">
			<column name="official_date" length="23" />
		</property>

		<property name="payWay" type="string">
			<column name="pay_way" length="50" />
		</property>

		<property name="currStatus" type="string">
			<column name="curr_status" length="50" />
		</property>

		<property name="isQuit" type="string">
			<column name="is_quit" length="50" />
		</property>

		<property name="photo" type="string">
			<column name="photo" length="50" />
		</property>
		<property name="name" type="string">
			<column name="name" length="50" />
		</property>
        <many-to-one name="grade" class="cn.firstsoft.modules.emp.domain.EmpBaseInfo" fetch="select">
            <column name="grade"/>
        </many-to-one>
		<property name="identityCard" type="string">
			<column name="identity_card" length="50" />
		</property>
		<property name="province" type="string">
			<column name="province" length="50" />
		</property>
		<property name="hireDate" type="timestamp">
			<column name="hire_date" length="23" />
		</property>
		<property name="hireMonth" type="string">
			<column name="hire_month" length="50" />
		</property>
		<property name="workYears" type="integer">
			<column name="work_years"/>
		</property>
		<property name="legalityDate" type="timestamp">
			<column name="legality_date" length="23" />
		</property>
		 <many-to-one name="workType" class="cn.firstsoft.modules.emp.domain.EmpBaseInfo" fetch="select">
            <column name="work_type"/>
        </many-to-one>
		<property name="bank" type="string">
			<column name="bank" length="50" />
		</property>
		<property name="bankNo" type="string">
			<column name="bank_no" length="50" />
		</property>
		<property name="hireWay" type="string">
			<column name="hire_way" length="50" />
		</property>
		<property name="professionalTitle" type="string">
			<column name="professional_title" length="50" />
		</property>
		<property name="accountType" type="string">
			<column name="account_type" length="50" />
		</property>
		<property name="mobile" type="string">
			<column name="mobile" length="50" />
		</property>
		<property name="ensureNo" type="string">
			<column name="ensure_no" length="50" />
		</property>
		<property name="offerType" type="integer">
			<column name="offer_type" />
		</property>
		<property name="postcode" type="string">
			<column name="postcode" length="50" />
		</property>

		<property name="political" type="string">
			<column name="political" length="50" />
		</property>
		<property name="baseWage" type="string">
			<column name="base_wage" length="50" />
		</property>
        <property name="isopen" type="string">
			<column name="isopen" length="200" />
		</property>
		<property name="email" type="string">
			<column name="email" length="50" />
		</property>
		<property name="email2" type="string">
			<column name="email2" length="50" />
		</property>
		 <property name="homephone" type="string">
			<column name="homephone" length="50" />
		</property>
		<property name="officephone" type="string">
			<column name="officephone" length="50" />
		</property>
		<property name="address" type="string">
			<column name="address" length="250" />
		</property>
		<property name="fax" type="string">
			<column name="fax" length="50" />
		</property>
		<property name="qq" type="string">
			<column name="qq" length="50" />
		</property>
		<property name="msn" type="string">
			<column name="msn" length="50" />
		</property>
		<property name="homepage" type="string">
			<column name="homepage" length="50" />
		</property>
		<property name="rems" type="string">
			<column name="rems" length="50" />
		</property>
		<set name="empWorkExperience" inverse="true">
			<key>
				<column name="emp_id" not-null="true" />
			</key>
			<one-to-many
				class="cn.firstsoft.modules.emp.domain.EmpWorkExperience" />
		</set>
		<set name="empTechnic" inverse="true">
			<key>
				<column name="emp_id" not-null="true" />
			</key>
			<one-to-many
				class="cn.firstsoft.modules.emp.domain.EmpTechnic" />
		</set>
		<set name="empLearn" inverse="true">
			<key>
				<column name="emp_id" not-null="true" />
			</key>
			<one-to-many
				class="cn.firstsoft.modules.emp.domain.EmpLearn" />
		</set>
		<set name="empCertificate" inverse="true">
			<key>
				<column name="emp_id" not-null="true" />
			</key>
			<one-to-many
				class="cn.firstsoft.modules.emp.domain.EmpCertificate" />
		</set>
	</class>
</hibernate-mapping>
